* data.c (Fsubr_name): Rewrite to avoid a strlen call.
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 19 Jun 2011 18:44:58 +0000 (11:44 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 19 Jun 2011 18:44:58 +0000 (11:44 -0700)
src/ChangeLog
src/data.c

index eb98d81f1250b9f8d4ffb210552ebdf5a39bcb53..6c0732a7c8868161e8d78cc8317bef68e2e5afa7 100644 (file)
@@ -1,5 +1,7 @@
 2011-06-19  Paul Eggert  <eggert@cs.ucla.edu>
 
+       * data.c (Fsubr_name): Rewrite to avoid a strlen call.
+
        * coding.c (make_subsidiaries): Don't assume string length fits in int.
 
        * callproc.c (child_setup): Rewrite to avoid two strlen calls.
index cf01d38036d248f92cb1a0e0c6b4a25c0312873d..6b4ea32ac9ea8867d5411a9211ee85ffeaf22b84 100644 (file)
@@ -703,7 +703,7 @@ SUBR must be a built-in function.  */)
   const char *name;
   CHECK_SUBR (subr);
   name = XSUBR (subr)->symbol_name;
-  return make_string (name, strlen (name));
+  return build_string (name);
 }
 
 DEFUN ("interactive-form", Finteractive_form, Sinteractive_form, 1, 1, 0,